/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gui.messages;

import javax.swing.JDialog;
import javax.swing.JOptionPane;

/**
 *
 * @author triki
 */
public abstract class AbstractMessage {

    protected String title;

    public AbstractMessage()
    {
        setTitle();
    }

    public void show(String mensaje)
    {
         JOptionPane op = new JOptionPane(mensaje);
         JDialog diag = op.createDialog(title);
         diag.setVisible(true);
    }

    abstract void setTitle();

}
